package com.xuecheng.content.convert;

import com.xuecheng.api.content.model.dto.CourseBaseDTO;
import com.xuecheng.content.entity.CourseBase;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface EntityMapperPo {

    EntityMapperPo INSTANCE = Mappers.getMapper(EntityMapperPo.class);

    @Mappings({
            @Mapping( source = "courseBaseId",target = "id")
    })
    CourseBase courseBaseDTOToCourseBase(CourseBaseDTO dto);
}
